package spring;

import java.net.URL;
import java.util.Enumeration;

public class LoadTest {
	
	public static void main(String[] args) throws Exception {
		String file = "META-INF/spring.factories";
		
		
		ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
		System.out.println("contextClassLoader="+contextClassLoader);
		
		ClassLoader systemClassLoader = ClassLoader.getSystemClassLoader();
		System.out.println("systemClassLoader="+systemClassLoader);
		
		Enumeration<URL>  urls = ClassLoader.getSystemResources(file);
		while(urls.hasMoreElements()) {
			URL url = urls.nextElement();
			System.out.println("url="+url);
		}
		System.out.println("\n\n");
		
		urls = contextClassLoader.getResources(file);
		while(urls.hasMoreElements()) {
			URL url = urls.nextElement();
			System.out.println("url="+url);
		}
		System.out.println("\n\n");

		
		//
		
		

	}
	
	
}
	